package ex;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class EX9 {

        public static void main(String[] args) {
            List<Integer> list = new ArrayList<Integer>();
            for (int i = 0; i < 10; i++) {
                list.add(new Integer(i));
            }
            System.out.println("打乱前:"+list);
            for (int i = 0; i < 5; i++) {
                Collections.shuffle(Collections.singletonList(list));
                System.out.println("第" + i + "次打乱："+list);
            }
        }
    }


